package com.example.myapplication.tutorial

import android.graphics.Color
import com.facebook.litho.Column
import com.facebook.litho.Component
import com.facebook.litho.ComponentContext
import com.facebook.litho.annotations.LayoutSpec
import com.facebook.litho.annotations.OnCreateLayout
import com.facebook.litho.widget.Text


/**
 * TODO 简要描述
 * @author wkm @ Zebra Inc.
 * @since 09-20-2020
 */
@LayoutSpec
object ListItemSpec {
    @OnCreateLayout
    fun onCreateLayout(c: ComponentContext?): Component {
        return Column.create(c)
            .backgroundColor(Color.WHITE)
            .child(
                Text.create(c)
                    .text("Hello world")
                    .textSizeSp(40F)
            )
            .child(
                Text.create(c)
                    .text("Litho tutorial")
                    .textSizeSp(20F)
            )
            .build()
    }
}